package org.swiftsuspenders.injectionresults
{
	import org.swiftsuspenders.Injector;
	
	
public class InjectValueResult extends InjectionResult
{
	
	public function InjectValueResult(value : Object)
	{
		m_value = value;
	}
	
	
	private var m_value : Object;
	
	
	override public function getResponse(injector : Injector) : Object
	{
		return m_value;
	}

	override public function equals(otherResult : InjectionResult) : Boolean
	{
		if (otherResult == this)
		{
			return true;
		}
		if (!(otherResult is InjectValueResult))
		{
			return false;
		}
		var castedResult : InjectValueResult =  InjectValueResult(otherResult);
		return castedResult.m_value == m_value;
	}
}
}